package com.cn.springcloudshop.mapper;

import com.cn.springcloudshop.model.YmShopCat;
import com.cn.springcloudshop.model.YmShopCatExample;
import com.cn.springcloudshop.model.YmShopCatPOJO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface YmShopCatMapper {
    int countByExample(YmShopCatExample example);

    int deleteByExample(YmShopCatExample example);

    int deleteByPrimaryKey(Long id);

    int insert(YmShopCat record);

    int insertSelective(YmShopCat record);

    List<YmShopCat> selectByExample(YmShopCatExample example);

    YmShopCat selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") YmShopCat record, @Param("example") YmShopCatExample example);

    int updateByExample(@Param("record") YmShopCat record, @Param("example") YmShopCatExample example);

    int updateByPrimaryKeySelective(YmShopCat record);

    int updateByPrimaryKey(YmShopCat record);

    int deleteBatchByPK(@Param("ids")List<Long> ids,@Param("status") Integer status);

    YmShopCat getRootCat();        //返回根菜单

    List<YmShopCatPOJO> findCatByParentId(Long parentid);//根据父一级菜单，返回所有子菜单
}